package javabook.ch06;

class Jv_6_5 extends Sungjuk_6_5_4 { 
	public static void main(String[] args) { 
		
		Sungjuk_6_5 ttt = new Sungjuk_6_5(); 
		ttt.title(); 
		
		Sungjuk_6_5_1 ken_sung = new Sungjuk_6_5_4();
		Sungjuk_6_5_2 wife_sung = new Sungjuk_6_5_4();
		Sungjuk_6_5_3 yoo_sung = new Sungjuk_6_5_4(); 
		Sungjuk_6_5_4 soo_sung = new Sungjuk_6_5_4(); 
		
		ken_sung.prt_data1(); 
		wife_sung.prt_data2(); 
		yoo_sung.prt_data3(); 
		soo_sung.prt_data4(); 
		
	} 
} 

class Sungjuk_6_5 { 
	
	void title() { 
		System.out.println("*** 객체의 형 변환 ***"); 
		System.out.println("*** 자바의 성적 출력 ***"); 
		System.out.println("**학번** **성명** **점수**"); 
		System.out.println("---------------------------"); 
	}
}

class Sungjuk_6_5_1 extends Sungjuk_6_5 { 
	
	String hakbun1 = "2060001"; 
	String name1 = "Ko Eung-Nam"; 
	int jumsu1 = 60; 
	
	public void prt_data1() { 
		
		System.out.println(hakbun1 + "  " + name1 + " " + jumsu1); 
	} 
} 

class Sungjuk_6_5_2 extends Sungjuk_6_5_1 { 
	
	String hakbun2 = "2060002"; 
	String name2 = "Boo Chang-Mi"; 
	int jumsu2 = 80; 
	
	public void prt_data2() { 
		
		System.out.println(hakbun2 + "  " + name2 + " " + jumsu2); 
	} 
} 

class Sungjuk_6_5_3 extends Sungjuk_6_5_2 { 
	
	String hakbun3 = "2060003";
	String name3 = "Ko Yoo-Jin"; 
	int jumsu3 = 100; 

	public void prt_data3() { 
	
		System.out.println(hakbun3 + "  " + name3 + " " + jumsu3); 
	} 
}

class Sungjuk_6_5_4 extends Sungjuk_6_5_3 { 
	String hakbun4 = "2060004"; 
	String name4 = "Ko Su-Ji"; 
	int jumsu4 = 99; 

	public void prt_data4() { 
	
		System.out.println(hakbun4 + "  " + name4 + " " + jumsu4); 
	} 
} 








